From: Keir Fraser Date: Thu, 20 Sep 2007 08:42:01 +0000 (+0100) Subject: VTD: Small fix to iommu initialisation. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14937^2~59^2~1 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=0fb79e27480f53aa66475914da22560de4fc2b96;p=xen.git VTD: Small fix to iommu initialisation. Signed-off-by: Allen Kay Signed-off-by: Guy Zana --- diff --git a/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c b/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c index 67175b2f81..eaeca7d367 100644 --- a/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c +++ b/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include "dmar.h" @@ -1669,6 +1670,7 @@ int iommu_setup(void) struct hvm_iommu *hd = domain_hvm_iommu(dom0); struct acpi_drhd_unit *drhd; struct iommu *iommu; + unsigned long i; if (!vtd_enabled) return 0; @@ -1687,8 +1689,9 @@ int iommu_setup(void) drhd = list_entry(acpi_drhd_units.next, typeof(*drhd), list); iommu = drhd->iommu; - hd->pgd = (struct dma_pte *)alloc_xenheap_page(); - memset((u8*)hd->pgd, 0, PAGE_SIZE); + /* setup 1:1 page table for dom0 */ + for (i = 0; i < max_page; i++) + iommu_map_page(dom0, i, i); if (init_vtd_hw()) goto error;